cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
cmake_policy(SET CMP0054 NEW)

set(PROJECT_VERSION 0.2.0)
project(SV2MotCppNodes VERSION ${PROJECT_VERSION} LANGUAGES CXX)

add_definitions(-DAPI_EXPORTS)
set(CMAKE_BUILD_TYPE "Release")

find_package(Eigen3 REQUIRED)
find_package(SpireMS REQUIRED)

include_directories(${EIGEN3_INCLUDE_DIRS})
include_directories(${SpireMS_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

include_directories(
  #${CMAKE_CURRENT_SOURCE_DIR}/sort
  ${CMAKE_CURRENT_SOURCE_DIR}/bytetrack
)


# Public header
set(
  HEADS
  sv2_mot.h
)

set(
  SRCS
  sv2_mot.cpp
)

#file(GLOB ALG_SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/sort/*.cpp)
#list(APPEND SRCS ${ALG_SRC_FILES})
file(GLOB ALG_SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/bytetrack/*.cpp)
list(APPEND SRCS ${ALG_SRC_FILES})

add_executable(SV2MotDemo SV2MotDemo.cpp ${SRCS})
target_link_libraries(SV2MotDemo ${SpireMS_LIBS})


install(TARGETS SV2MotDemo
  RUNTIME DESTINATION bin
)